public class Solution344 {
    public void reverseString(char[] s) {
        for (int i=0,j=s.length-1;i<j;i++,j--){
            char temp=s[i];
            s[i]=s[j];
            s[j]=temp;
        }
    }

    public static void main(String[] args) {
        char[] s=new char[]{'h','e','l','l','o'};
        new Solution344().reverseString(s);
        System.out.println(String.valueOf(s));
    }
}
